Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

Fix invalid regex in Wappalyzer/data/technologies.json: Symfony -> html #80

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

arielf
Copy link

@arielf arielf commented Jan 18, 2023

python3.11/site-packages/Wappalyzer/Wappalyzer.py:226: UserWarning: Caught 'unbalanced parenthesis at position 119' compiling regex:
['(?:<div class="sf-toolbar[^>]+?>[^]+([\d.])+|<div id="sfwdt[^"]+" class="[^"]*sf-toolbar)', 'version:\1']
----------------------------------^^^ invalid sub-regex
The 'position 119' seems to a delayed reaction to the core issue.

Indeed it looks like the sub-regex: [^]+ just before is invalid since ^ is a negation/complement for the char-class which is empty here.

The problem is in the data-file:
Wappalyzer/data/technologies.json
line 11961
The rule for "Symfony": "html": should be (one char change):
"html": "(?:<div class="sf-toolbar[^>]+?>[^<]+<span class="sf-toolbar-value">([\d.])+|<div id="sfwdt[^\"]+" class="[^\"]*sf-toolbar)\;version:\1",
----------------------------------------------^^^^ the fix

`Fixing this invalid regex issue I started seeing with python 3.11:

~/.VENV/3.11/lib/python3.11/site-packages/Wappalyzer/Wappalyzer.py:226:
UserWarning: Caught 'unbalanced parenthesis at position 119' compiling regex:
['(?:<div class="sf-toolbar[^>]+?>[^]+<span class="sf-toolbar-value">([\\d.])+|<div id="sfwdt[^"]+" class="[^"]*sf-toolbar)', 'version:\\1']
Fix invalid regex in Symfony: html:
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant